package pa165.dominating.species.service;

import java.util.List;
import pa165.dominating.species.tos.EnvironmentTo;

/**
 *
 * @author Stanislau Dubrouski
 */
public interface EnvironmentService {

    /**
     * Stores specified Environment to db. Id is generated automatically.
     *
     * @param env Environment to store
     */
    public void createEnvironment(EnvironmentTo env);

    /**
     * Deletes specified Environment from db.
     *
     * @param env Environment to delete
     */
    public void deleteEnvironment(EnvironmentTo env);

    /**
     * Returns Environment with specified id
     *
     * @param id Id of Environment to return.
     * @return Environment with given id
     */
    public EnvironmentTo getEnvironmentById(Long id);

    /**
     * Updates specified Environment
     *
     * @param env Environment to update
     * @return updated Environment
     */
    public EnvironmentTo updateEnvironment(EnvironmentTo env);

    /**
     * Returns all Environments in db.
     *
     * @return all Environments in db
     */
    public List<EnvironmentTo> getAllEnvironments();
}
